Breathing is controlled by the medulla of the brain. It repeatedly triggers contraction of the diaphragm initiating inspiration. The rate of breathing changes with activity level in response to carbon dioxide levels, and to a lesser extent, oxygen levels, in the blood. Carbon dioxide lowers the pH of the blood.